﻿<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Microsoft.PowerShell.CmdletManagement"
    x:Class="Microsoft.PowerShell.CmdletManagement.NewProject"
    Title="New Cmdlet Designer Project" Height="520" Width="500" 
    WindowStyle="ToolWindow" 
    WindowStartupLocation="CenterScreen" 
     ShowInTaskbar="False" ResizeMode="NoResize" >
	<DockPanel>
		<StackPanel DockPanel.Dock="Bottom">
			<Rectangle Fill="{DynamicResource DialogBorderColor}" Height="1" Margin="0,5,0,3"/>

			<StackPanel HorizontalAlignment="Right" Margin="0,5,0,10" Orientation="Horizontal" >
				<Button Click ="Click_Ok" IsDefault="True" Width="70" Margin="0,0,10,0" Height="Auto" Content="Submit"/>
				<Button Click="Click_Cancel" IsDefault="False" Width="70" Margin="0,0,10,0" Height="Auto" Content="Cancel"/>
			</StackPanel>
		</StackPanel>
		
		<Canvas Width="494" >
		<DockPanel Width="494" >
		
		<StackPanel>

			<TextBlock Name="TopInstructions" VerticalAlignment="Top" TextWrapping="Wrap" Margin="5,5,5,2"
					   FontWeight="Bold"><Run Text="Provide a new project name and description or simply select a project from the list below to update."/></TextBlock>
			
			<local:ExtendedTextBlock x:Name="NameBlock" Label="Project Name"
							 HelpText="Type the name of the project you wish to create."
                             IsReadOnly="False"
							 Value="{Binding Path=Name, Mode=TwoWay}"
                             />
			<local:ExtendedTextBlock x:Name="Description" Label="Project Description"
                             HelpText="Describe the project details."
                             IsReadOnly="False"
							 Value="{Binding Path=Description, Mode=TwoWay}"
							 />
			<local:ExtendedTextBlock x:Name="ProjectAdmin" Label="Project Owner"
                             HelpText="Describe the project details."
                             IsReadOnly="True"
							 Value="{Binding Path=Owner, Mode=TwoWay}"
							 />
			<local:ExtendedTextBlock x:Name="Id" Label="Project Id"
                             HelpText="Describe the project details."
                             IsReadOnly="True"
							 Value="{Binding Path=Id, Mode=TwoWay}"
							 />
			<StackPanel Margin="5,10,7,2" >
				
				
				<ListView Margin="0,10,0,10"
						  MouseDoubleClick="DoubleClick_SelectProjectToUpdate" SelectedIndex="0"
						  Name="ProjectList" ItemsSource="{Binding}"
						  SelectionMode="Single"
						  Height="175" 
						  VerticalAlignment="Stretch" HorizontalAlignment="Stretch"
						  >
					<ListView.View>
						<GridView x:Name="ProjectsView">
							<GridViewColumn DisplayMemberBinding="{Binding Name}" >
								<GridViewColumnHeader Content="Project Name" MinWidth="120" />
							</GridViewColumn>
							<GridViewColumn DisplayMemberBinding="{Binding Description}">
								<GridViewColumnHeader Content="Description" MinWidth="120" />
							</GridViewColumn>
							<GridViewColumn DisplayMemberBinding="{Binding Owner}">
								<GridViewColumnHeader Content="Project Owner" MinWidth="120" />
							</GridViewColumn>
							<GridViewColumn DisplayMemberBinding="{Binding Id}">
								<GridViewColumnHeader Content="Project Id" MaxWidth="20" />
							</GridViewColumn>
						</GridView>
					</ListView.View>
				</ListView>
				
			</StackPanel>

		</StackPanel>
		</DockPanel>
		<StackPanel x:Name="ProgressIndicator" Width="200.659" Height="20.667" Canvas.Left="132.667" Canvas.Top="330.833" Orientation="Horizontal">
			<TextBlock Width="100" Height="20.667" 
				Text="Loading Projects..." 
				TextWrapping="Wrap"
				   />
			<ProgressBar Margin="0,0,0,4" Width="100" Height="10" IsIndeterminate="True"/>
		</StackPanel>
		
	</Canvas>
	</DockPanel>
	
</Window>
